package com.jiuyi.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.jiuyi.entity.Employee;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * DATA: 2022/10/17
 * Author: 晨夕
 */
@Mapper
public interface EmployeeMapper extends BaseMapper<Employee> {
    //根据username查询密码
    String selectPasswordByUsername(@Param("username") String username);
    //查询员工
    List<Employee> selectEmployeeList(@Param("i") int i, @Param("pageSize") int pageSize, @Param("name") String name);
    //查询数据个数
    int selectEmployeeCount(@Param("name") String name);
    //修改时判断是否存在账号
    int selectUsernameIsExist(@Param("username") String username,@Param("id") Long id);
    //修改时判断是否存在身份证
    int selectIdNumberIsExist(@Param("idNumber") String idNumber,@Param("id") Long id);
    //修改时判断是否存在手机号
    int selectPhoneIsExist(@Param("phone") String phone,@Param("id") Long id);
}
